package com.wpp.concurrent.demo3_callable;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

/**
 * @author wpp25
 * @date 2021/6/22 22:21
 * @description：
 */
public class ClientTest {

    public static void main(String[] args) throws ExecutionException, InterruptedException {

        FutureTask<String> futureTask = new FutureTask<>(new Demo3Callable());

        Thread thread = new Thread(futureTask);
        thread.start();

        System.out.println(futureTask.get());
        System.out.println("main is over");
    }
}
